import { lazy } from 'react';
import { CartIcon } from 'tdesign-icons-react';
import { IRouter } from '../index';

const result: IRouter[] = [
  {
    path: '/goods',
    meta: {
      title: '商品管理',
      Icon: CartIcon,
    },
    children: [
      {
        path: '/list',
        Component: lazy(() => import('pages/Goods/List')),
        meta: {
          title: '商品列表',
        },
      },
      {
        path: '/add',
        Component: lazy(() => import('pages/Goods/Add')),
        meta: {
          title: '发布商品',
        },
      },
      {
        path: '/addType',
        Component: lazy(() => import('pages/Goods/AddType')),
        meta: {
          title: '管理商品类型',
        },
      },
    ],
  },
];

export default result;
